Does their exist any function to get attribute type.I am not asking about base type as I know I can get it using "type(module m,string attrname)" |
Re: Get Attribute Type
Hi,
// name
AttrType at = find(current Module, "Created Thru")
print at.name // prints "Created Thru"
// type
AttrType at = find(current Module, "Integer")
print stringOf at.type
print at.type "\n"
// test for a minimum value
AttrType at = find(current Module, "Type with Min Int value")
if (at.minValue) {
// Enter here if type has a minimum value.
// The following is valid only if base type
// is integer.
// The operator is also defined for real and
// date
int i = at.minValue
}
// strings
AttrType t
t=find(current Module, "TableType")
print t.strings[1]
// size
AttrType at = find(current Module, "Boolean")
print at.size // prints "2"
// names
AttrType at = find(current Module, "Boolean")
print at.strings[0]
print at.strings[1]
// values
AttrType at = find(current,"Boolean")
print at.values[0]
print at.values[1]
// colors
AttrType at = find(current,"Boolean")
print at.colours[0]
print at.colors[1]
// canWrite and system
AttrType at
Module m = current
for at in m do{
print at.name "- system: " at.system"; can
write: " at.canWrite "\n"
}
|